Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Fix AttributeErrors in nic methods #720

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dwettstein
Copy link
Contributor

@dwettstein dwettstein commented Nov 12, 2020

Fix a possible AttributeError in the following methods when NetworkConnection is not available:

  • vm.py:delete_nic()
  • vm.py:update_nic()

Additionally, I applied the same variable names in update_nic() method as used in other nic methods and fixed the error message when nic was not found.


This change is Reviewable

@dwettstein dwettstein changed the title Fix AttributeError in delete_nic Fix AttributeErrors in nic methods Nov 12, 2020
@dwettstein
Copy link
Contributor Author

What do you think about this PR, @rocknes ?

@dwettstein
Copy link
Contributor Author

Hey @Anirudh9794 or @rocknes

I'd like to kindly ask you to have a look at this PR, as these bugs are still not fixed.

Regarding the changes in update_nic(). There are actually not many:

  • I renamed to variable and logic from nic_found to nic_not_found as also used in delete_nic(),
  • I renamed to loop variable nc to network as also used in delete_nic(),
  • I have improved the error message in update_nic() analogous to the one used in delete_nic(),
  • I moved the method update_nic() to the other nic methods.

Do you have any questions?

@dwettstein
Copy link
Contributor Author

Hi @rocknes

Anything else I can do to get this PR merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant